package cn.hg.solon.youcan.web.controller.common;

import java.util.List;

import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.Result;
import org.noear.solon.core.handle.UploadedFile;

import cn.hg.solon.youcan.web.admin.controller.BaseAdminController;

/**
 * @author 胡高
 * @date 2022/08/10
 */
@Controller
@Mapping("/common")
public class CommonController extends BaseAdminController {

    @Mapping("/fileDownload")
    public void fileDownload(Context ctx, UploadedFile file) {

    }

    @Mapping("/resourceDownload")
    public void resourceDownload(Context ctx, String resource) {

    }

    @Mapping("/uploadFile")
    public Result<Object> uploadFile(Context ctx, UploadedFile file) throws Exception {
        return Result.failure();
    }

    @Mapping("/uploadFiles")
    public Result<Object> uploadFiles(Context ctx, List<UploadedFile> files) throws Exception {
        return Result.failure();
    }
}
